#ifndef LABEL_H_
#define LABEL_H_

#include <aknapp.h>
#include <eikenv.h>			// for CEikonEnv
#include <eikmenub.h>		// for CEikMenuBar
#include <eiksbfrm.h>		// for CEikScrollBarFrame
#include "BaseControl.h"

class CLabel : public CBaseControl
{
public:
    static CLabel* NewL(const TRect& aRect,const CCoeControl* aParent);
	static CLabel* NewLC(const TRect& aRect,const CCoeControl* aParent);
	virtual ~CLabel();
public:
	void SetTextL(const TDesC& aText);
	void SetLayout();
	void SizeChanged(const TRect& aRect);
	void SetTextColor(TInt aColor);
	void SetUnderLine(TBool aUnderLine);
	
private:
	CLabel();
	void ConstructL(const TRect& aRect,const CCoeControl* aParent);
	void Draw(CWindowGc& gc, const TRect& aRect) const;
	void DrawFocusEffect(CWindowGc& gc, const TRect& aRect) const;
	TInt calcLineChar(const TDesC& info, TInt& thisEnd, TInt& nextStart);
private:
	RArray<TLineInfo> iInfoArray;
	TBool iWordWrap;
	TInt iBorderWidth;
	TInt iLeftMargin;
	TInt iRightMargin;
	TInt iTopMargin;
	TInt iLineSpace;
	TInt iTopLine;
	TInt iTextColor;
	TBool iUnderLine;
	HBufC* iText;
};

#endif /*LABEL_H_*/
